﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using Bitis_KeToanThue_Pro_DungChung.Common;

namespace Bitis_KeToanThue_Pro_Update.AccessDatabase
{
    public class MainProgram
    {
        AccessData ac = new AccessData(1);
        public DataTable layquyen(int id)
        {
            SqlParameter[] arrPara = new SqlParameter[1];
            arrPara[0] = new SqlParameter("@ID", SqlDbType.Int);
            arrPara[0].Value = id;

            return ac.ftblDocDuLieuSP("layquyen", arrPara);

        }
        public DataTable loadmenushowtest(int UserID, int MaNhomUser, int MaChuongTrinh, int IDViTri, int MaNhomMenu)
        {
            SqlParameter[] arrPara = new SqlParameter[5];
            arrPara[0] = new SqlParameter("@UserID", SqlDbType.Int);
            arrPara[0].Value = UserID;
            arrPara[1] = new SqlParameter("@MaNhomUser", SqlDbType.Int);
            arrPara[1].Value = MaNhomUser;
            arrPara[2] = new SqlParameter("@MaChuongTrinh", SqlDbType.Int);
            arrPara[2].Value = MaChuongTrinh;
            arrPara[3] = new SqlParameter("@IDViTri", SqlDbType.Int);
            arrPara[3].Value = IDViTri;
            arrPara[4] = new SqlParameter("@MaNhomMenu", SqlDbType.Int);
            arrPara[4].Value = MaNhomMenu;

            return ac.ftblDocDuLieuSP("loadmenushowfinal", arrPara);

        }
    }
}
